# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=font-ibm-type1
pkgver=1.0.3
pkgrel=0
pkgdesc="X.org ibm Type1 fonts"
url="http://xorg.freedesktop.org/"
arch="all"
license="custom"
depends="encodings font-alias mkfontscale mkfontdir fontconfig"
makedepends="font-util-dev bdftopcf"
install=
source="https://www.x.org/releases/individual/font/$pkgname-$pkgver.tar.bz2"

prepare() {
	cd "$srcdir"/$pkgname-$pkgver
	update_config_sub || return 1
}

build() {
	cd "$srcdir"/$pkgname-$pkgver
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--with-mapfiles=/usr/share/fonts/util \
		--with-fontdir=/usr/share/fonts/Type1 \
		|| return 1
	make || return 1
}

package() {
	cd "$srcdir"/$pkgname-$pkgver
	make -j1 DESTDIR="$pkgdir" \
		MKFONTDIR=: \
		MKFONTSCALE=: \
		FCCACHE=: \
		install || return 1
}

sha512sums="cbd179522c936c4f956ff1fbdc48fc3a55990083b4f858c938c6a54c8526641b4f25eb3a6795d774630b75a0f4fbdf9c16e861e88b2cd95f04c524f95d40f90f  font-ibm-type1-1.0.3.tar.bz2"
